package com.bosicloud.cmb.ibp.api.manager.commom.model;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author Jack Peng / ziliang.peng@bosicloud.com
 */
@Data
@Table
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class IbpApi {

    @Id
    Integer id;
    @NotNull
    @Min(value = 0, message = "请正确填写categoryId")
    Integer categoryId;
    @NotNull
    @NotBlank(message = "apiName不能为空")
    String apiName;
    @NotNull
    @NotBlank(message = "apiLogo不能为空")
    String logo;
    @NotNull
    @NotBlank(message = "apiSwagger路径不能为空")
    String swagger;
    @NotNull
    @NotBlank(message = "请填写API描述信息")
    String descp;
    @NotNull
    @Min(value = 0, message = "正确填写userId")
    Integer createUser;
    @NotNull
    @NotBlank(message = "ver版本不能为空")
    String ver;
    Date createTime;
    String status;
    String awsApiId;
    Date updateTime;
    Boolean isPublic;
}
